export const ucs03abi = [
  {
    type: "function",
    name: "ensureExported",
    inputs: [{
      name: "",
      type: "tuple",
      internalType: "struct ZkgmPacket",
      components: [{ name: "salt", type: "bytes32", internalType: "bytes32" }, {
        name: "path",
        type: "uint256",
        internalType: "uint256",
      }, {
        name: "instruction",
        type: "tuple",
        internalType: "struct Instruction",
        components: [{ name: "version", type: "uint8", internalType: "uint8" }, {
          name: "opcode",
          type: "uint8",
          internalType: "uint8",
        }, { name: "operand", type: "bytes", internalType: "bytes" }],
      }],
    }, {
      name: "",
      type: "tuple",
      internalType: "struct Instruction",
      components: [{ name: "version", type: "uint8", internalType: "uint8" }, {
        name: "opcode",
        type: "uint8",
        internalType: "uint8",
      }, { name: "operand", type: "bytes", internalType: "bytes" }],
    }, {
      name: "",
      type: "tuple",
      internalType: "struct Forward",
      components: [
        { name: "path", type: "uint256", internalType: "uint256" },
        { name: "timeoutHeight", type: "uint64", internalType: "uint64" },
        { name: "timeoutTimestamp", type: "uint64", internalType: "uint64" },
        {
          name: "instruction",
          type: "tuple",
          internalType: "struct Instruction",
          components: [{ name: "version", type: "uint8", internalType: "uint8" }, {
            name: "opcode",
            type: "uint8",
            internalType: "uint8",
          }, { name: "operand", type: "bytes", internalType: "bytes" }],
        },
      ],
    }, {
      name: "",
      type: "tuple",
      internalType: "struct Multiplex",
      components: [
        { name: "sender", type: "bytes", internalType: "bytes" },
        { name: "eureka", type: "bool", internalType: "bool" },
        { name: "contractAddress", type: "bytes", internalType: "bytes" },
        { name: "contractCalldata", type: "bytes", internalType: "bytes" },
      ],
    }, {
      name: "",
      type: "tuple",
      internalType: "struct Batch",
      components: [{
        name: "instructions",
        type: "tuple[]",
        internalType: "struct Instruction[]",
        components: [{ name: "version", type: "uint8", internalType: "uint8" }, {
          name: "opcode",
          type: "uint8",
          internalType: "uint8",
        }, { name: "operand", type: "bytes", internalType: "bytes" }],
      }],
    }, {
      name: "",
      type: "tuple",
      internalType: "struct FungibleAssetOrder",
      components: [
        { name: "sender", type: "bytes", internalType: "bytes" },
        { name: "receiver", type: "bytes", internalType: "bytes" },
        { name: "baseToken", type: "bytes", internalType: "bytes" },
        { name: "baseAmount", type: "uint256", internalType: "uint256" },
        { name: "baseTokenSymbol", type: "string", internalType: "string" },
        { name: "baseTokenName", type: "string", internalType: "string" },
        { name: "baseTokenDecimals", type: "uint8", internalType: "uint8" },
        { name: "baseTokenPath", type: "uint256", internalType: "uint256" },
        { name: "quoteToken", type: "bytes", internalType: "bytes" },
        { name: "quoteAmount", type: "uint256", internalType: "uint256" },
      ],
    }, {
      name: "",
      type: "tuple",
      internalType: "struct Ack",
      components: [{ name: "tag", type: "uint256", internalType: "uint256" }, {
        name: "innerAck",
        type: "bytes",
        internalType: "bytes",
      }],
    }, {
      name: "",
      type: "tuple",
      internalType: "struct BatchAck",
      components: [{ name: "acknowledgements", type: "bytes[]", internalType: "bytes[]" }],
    }, {
      name: "",
      type: "tuple",
      internalType: "struct FungibleAssetOrderAck",
      components: [{ name: "fillType", type: "uint256", internalType: "uint256" }, {
        name: "marketMaker",
        type: "bytes",
        internalType: "bytes",
      }],
    }],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "constructor",
    inputs: [
      { name: "_ibcHandler", type: "address", internalType: "contract IIBCModulePacket" },
      { name: "_weth", type: "address", internalType: "contract IWETH" },
      { name: "_erc20Impl", type: "address", internalType: "contract ZkgmERC20" },
      { name: "_rateLimitEnabled", type: "bool", internalType: "bool" },
      { name: "_sendImpl", type: "address", internalType: "contract UCS03ZkgmSendImpl" },
      { name: "_stakeImpl", type: "address", internalType: "contract UCS03ZkgmStakeImpl" },
    ],
    stateMutability: "nonpayable",
  },
  { type: "receive", stateMutability: "payable" },
  {
    type: "function",
    name: "ERC20_IMPL",
    inputs: [],
    outputs: [{ name: "", type: "address", internalType: "contract ZkgmERC20" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "EXEC_MIN_GAS",
    inputs: [],
    outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "IBC_HANDLER",
    inputs: [],
    outputs: [{ name: "", type: "address", internalType: "contract IIBCModulePacket" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "RATE_LIMIT_ENABLED",
    inputs: [],
    outputs: [{ name: "", type: "bool", internalType: "bool" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "SEND_IMPL",
    inputs: [],
    outputs: [{ name: "", type: "address", internalType: "address" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "STAKE_IMPL",
    inputs: [],
    outputs: [{ name: "", type: "address", internalType: "address" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "UPGRADE_INTERFACE_VERSION",
    inputs: [],
    outputs: [{ name: "", type: "string", internalType: "string" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "WETH",
    inputs: [],
    outputs: [{ name: "", type: "address", internalType: "contract IWETH" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "authority",
    inputs: [],
    outputs: [{ name: "", type: "address", internalType: "address" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "channelBalance",
    inputs: [{ name: "", type: "uint32", internalType: "uint32" }, {
      name: "",
      type: "uint256",
      internalType: "uint256",
    }, { name: "", type: "address", internalType: "address" }],
    outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "channelGovernanceToken",
    inputs: [{ name: "", type: "uint32", internalType: "uint32" }],
    outputs: [{ name: "", type: "bytes", internalType: "bytes" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "execute",
    inputs: [
      { name: "caller", type: "address", internalType: "address" },
      {
        name: "ibcPacket",
        type: "tuple",
        internalType: "struct IBCPacket",
        components: [
          { name: "sourceChannelId", type: "uint32", internalType: "uint32" },
          { name: "destinationChannelId", type: "uint32", internalType: "uint32" },
          { name: "data", type: "bytes", internalType: "bytes" },
          { name: "timeoutHeight", type: "uint64", internalType: "uint64" },
          { name: "timeoutTimestamp", type: "uint64", internalType: "uint64" },
        ],
      },
      { name: "relayer", type: "address", internalType: "address" },
      { name: "relayerMsg", type: "bytes", internalType: "bytes" },
      { name: "intent", type: "bool", internalType: "bool" },
    ],
    outputs: [{ name: "", type: "bytes", internalType: "bytes" }],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "getBucket",
    inputs: [{ name: "token", type: "address", internalType: "address" }],
    outputs: [{
      name: "",
      type: "tuple",
      internalType: "struct TokenBucket.Bucket",
      components: [
        { name: "capacity", type: "uint256", internalType: "uint256" },
        { name: "available", type: "uint256", internalType: "uint256" },
        { name: "refillRate", type: "uint256", internalType: "uint256" },
        { name: "lastRefill", type: "uint256", internalType: "uint256" },
      ],
    }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "gitRev",
    inputs: [],
    outputs: [{ name: "", type: "string", internalType: "string" }],
    stateMutability: "pure",
  },
  {
    type: "function",
    name: "ibcAddress",
    inputs: [],
    outputs: [{ name: "", type: "address", internalType: "address" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "inFlightPacket",
    inputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
    outputs: [
      { name: "sourceChannelId", type: "uint32", internalType: "uint32" },
      { name: "destinationChannelId", type: "uint32", internalType: "uint32" },
      { name: "data", type: "bytes", internalType: "bytes" },
      { name: "timeoutHeight", type: "uint64", internalType: "uint64" },
      { name: "timeoutTimestamp", type: "uint64", internalType: "uint64" },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "initialize",
    inputs: [{ name: "_authority", type: "address", internalType: "address" }],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "isConsumingScheduledOp",
    inputs: [],
    outputs: [{ name: "", type: "bytes4", internalType: "bytes4" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "onAcknowledgementPacket",
    inputs: [
      { name: "caller", type: "address", internalType: "address" },
      {
        name: "ibcPacket",
        type: "tuple",
        internalType: "struct IBCPacket",
        components: [
          { name: "sourceChannelId", type: "uint32", internalType: "uint32" },
          { name: "destinationChannelId", type: "uint32", internalType: "uint32" },
          { name: "data", type: "bytes", internalType: "bytes" },
          { name: "timeoutHeight", type: "uint64", internalType: "uint64" },
          { name: "timeoutTimestamp", type: "uint64", internalType: "uint64" },
        ],
      },
      { name: "ack", type: "bytes", internalType: "bytes" },
      { name: "relayer", type: "address", internalType: "address" },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "onChanCloseConfirm",
    inputs: [{ name: "", type: "address", internalType: "address" }, {
      name: "",
      type: "uint32",
      internalType: "uint32",
    }, { name: "", type: "address", internalType: "address" }],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "onChanCloseInit",
    inputs: [{ name: "", type: "address", internalType: "address" }, {
      name: "",
      type: "uint32",
      internalType: "uint32",
    }, { name: "", type: "address", internalType: "address" }],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "onChanOpenAck",
    inputs: [
      { name: "", type: "address", internalType: "address" },
      { name: "channelId", type: "uint32", internalType: "uint32" },
      { name: "", type: "uint32", internalType: "uint32" },
      { name: "counterpartyVersion", type: "string", internalType: "string" },
      { name: "", type: "address", internalType: "address" },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "onChanOpenConfirm",
    inputs: [{ name: "", type: "address", internalType: "address" }, {
      name: "channelId",
      type: "uint32",
      internalType: "uint32",
    }, { name: "", type: "address", internalType: "address" }],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "onChanOpenInit",
    inputs: [
      { name: "", type: "address", internalType: "address" },
      { name: "", type: "uint32", internalType: "uint32" },
      { name: "", type: "uint32", internalType: "uint32" },
      { name: "version", type: "string", internalType: "string" },
      { name: "", type: "address", internalType: "address" },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "onChanOpenTry",
    inputs: [
      { name: "", type: "address", internalType: "address" },
      { name: "", type: "uint32", internalType: "uint32" },
      { name: "", type: "uint32", internalType: "uint32" },
      { name: "", type: "uint32", internalType: "uint32" },
      { name: "version", type: "string", internalType: "string" },
      { name: "counterpartyVersion", type: "string", internalType: "string" },
      { name: "", type: "address", internalType: "address" },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "onRecvIntentPacket",
    inputs: [
      { name: "caller", type: "address", internalType: "address" },
      {
        name: "packet",
        type: "tuple",
        internalType: "struct IBCPacket",
        components: [
          { name: "sourceChannelId", type: "uint32", internalType: "uint32" },
          { name: "destinationChannelId", type: "uint32", internalType: "uint32" },
          { name: "data", type: "bytes", internalType: "bytes" },
          { name: "timeoutHeight", type: "uint64", internalType: "uint64" },
          { name: "timeoutTimestamp", type: "uint64", internalType: "uint64" },
        ],
      },
      { name: "relayer", type: "address", internalType: "address" },
      { name: "relayerMsg", type: "bytes", internalType: "bytes" },
    ],
    outputs: [{ name: "", type: "bytes", internalType: "bytes" }],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "onRecvPacket",
    inputs: [
      { name: "caller", type: "address", internalType: "address" },
      {
        name: "packet",
        type: "tuple",
        internalType: "struct IBCPacket",
        components: [
          { name: "sourceChannelId", type: "uint32", internalType: "uint32" },
          { name: "destinationChannelId", type: "uint32", internalType: "uint32" },
          { name: "data", type: "bytes", internalType: "bytes" },
          { name: "timeoutHeight", type: "uint64", internalType: "uint64" },
          { name: "timeoutTimestamp", type: "uint64", internalType: "uint64" },
        ],
      },
      { name: "relayer", type: "address", internalType: "address" },
      { name: "relayerMsg", type: "bytes", internalType: "bytes" },
    ],
    outputs: [{ name: "", type: "bytes", internalType: "bytes" }],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "onTimeoutPacket",
    inputs: [{ name: "caller", type: "address", internalType: "address" }, {
      name: "ibcPacket",
      type: "tuple",
      internalType: "struct IBCPacket",
      components: [
        { name: "sourceChannelId", type: "uint32", internalType: "uint32" },
        { name: "destinationChannelId", type: "uint32", internalType: "uint32" },
        { name: "data", type: "bytes", internalType: "bytes" },
        { name: "timeoutHeight", type: "uint64", internalType: "uint64" },
        { name: "timeoutTimestamp", type: "uint64", internalType: "uint64" },
      ],
    }, { name: "relayer", type: "address", internalType: "address" }],
    outputs: [],
    stateMutability: "nonpayable",
  },
  { type: "function", name: "pause", inputs: [], outputs: [], stateMutability: "nonpayable" },
  {
    type: "function",
    name: "paused",
    inputs: [],
    outputs: [{ name: "", type: "bool", internalType: "bool" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "predictStakeManagerAddress",
    inputs: [],
    outputs: [{ name: "", type: "address", internalType: "contract ZkgmERC721" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "predictWrappedToken",
    inputs: [{ name: "path", type: "uint256", internalType: "uint256" }, {
      name: "channel",
      type: "uint32",
      internalType: "uint32",
    }, { name: "token", type: "bytes", internalType: "bytes" }],
    outputs: [{ name: "", type: "address", internalType: "address" }, {
      name: "",
      type: "bytes32",
      internalType: "bytes32",
    }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "proxiableUUID",
    inputs: [],
    outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "registerGovernanceToken",
    inputs: [{ name: "channelId", type: "uint32", internalType: "uint32" }, {
      name: "unwrappedGovernanceToken",
      type: "bytes",
      internalType: "bytes",
    }],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "send",
    inputs: [
      { name: "channelId", type: "uint32", internalType: "uint32" },
      { name: "timeoutHeight", type: "uint64", internalType: "uint64" },
      { name: "timeoutTimestamp", type: "uint64", internalType: "uint64" },
      { name: "salt", type: "bytes32", internalType: "bytes32" },
      {
        name: "instruction",
        type: "tuple",
        internalType: "struct Instruction",
        components: [{ name: "version", type: "uint8", internalType: "uint8" }, {
          name: "opcode",
          type: "uint8",
          internalType: "uint8",
        }, { name: "operand", type: "bytes", internalType: "bytes" }],
      },
    ],
    outputs: [],
    stateMutability: "payable",
  },
  {
    type: "function",
    name: "setAuthority",
    inputs: [{ name: "newAuthority", type: "address", internalType: "address" }],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "setBucketConfig",
    inputs: [
      { name: "token", type: "address", internalType: "address" },
      { name: "capacity", type: "uint256", internalType: "uint256" },
      { name: "refillRate", type: "uint256", internalType: "uint256" },
      { name: "reset", type: "bool", internalType: "bool" },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "stakes",
    inputs: [{ name: "", type: "uint256", internalType: "uint256" }],
    outputs: [
      { name: "state", type: "uint8", internalType: "enum ZkgmStakeState" },
      { name: "channelId", type: "uint32", internalType: "uint32" },
      { name: "validator", type: "bytes", internalType: "bytes" },
      { name: "amount", type: "uint256", internalType: "uint256" },
      { name: "unstakingCompletion", type: "uint256", internalType: "uint256" },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "tokenOrigin",
    inputs: [{ name: "", type: "address", internalType: "address" }],
    outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
    stateMutability: "view",
  },
  { type: "function", name: "unpause", inputs: [], outputs: [], stateMutability: "nonpayable" },
  {
    type: "function",
    name: "upgradeToAndCall",
    inputs: [{ name: "newImplementation", type: "address", internalType: "address" }, {
      name: "data",
      type: "bytes",
      internalType: "bytes",
    }],
    outputs: [],
    stateMutability: "payable",
  },
  {
    type: "event",
    name: "AuthorityUpdated",
    inputs: [{ name: "authority", type: "address", indexed: false, internalType: "address" }],
    anonymous: false,
  },
  {
    type: "event",
    name: "Initialized",
    inputs: [{ name: "version", type: "uint64", indexed: false, internalType: "uint64" }],
    anonymous: false,
  },
  {
    type: "event",
    name: "Paused",
    inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }],
    anonymous: false,
  },
  {
    type: "event",
    name: "TokenBucketUpdate",
    inputs: [{ name: "token", type: "address", indexed: true, internalType: "address" }, {
      name: "capacity",
      type: "uint256",
      indexed: false,
      internalType: "uint256",
    }, { name: "refillRate", type: "uint256", indexed: false, internalType: "uint256" }],
    anonymous: false,
  },
  {
    type: "event",
    name: "Unpaused",
    inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }],
    anonymous: false,
  },
  {
    type: "event",
    name: "Upgraded",
    inputs: [{ name: "implementation", type: "address", indexed: true, internalType: "address" }],
    anonymous: false,
  },
  {
    type: "error",
    name: "AccessManagedInvalidAuthority",
    inputs: [{ name: "authority", type: "address", internalType: "address" }],
  },
  {
    type: "error",
    name: "AccessManagedRequiredDelay",
    inputs: [{ name: "caller", type: "address", internalType: "address" }, {
      name: "delay",
      type: "uint32",
      internalType: "uint32",
    }],
  },
  {
    type: "error",
    name: "AccessManagedUnauthorized",
    inputs: [{ name: "caller", type: "address", internalType: "address" }],
  },
  {
    type: "error",
    name: "AddressEmptyCode",
    inputs: [{ name: "target", type: "address", internalType: "address" }],
  },
  {
    type: "error",
    name: "ERC1967InvalidImplementation",
    inputs: [{ name: "implementation", type: "address", internalType: "address" }],
  },
  { type: "error", name: "ERC1967NonPayable", inputs: [] },
  { type: "error", name: "EnforcedPause", inputs: [] },
  { type: "error", name: "ErrAsyncMultiplexUnsupported", inputs: [] },
  { type: "error", name: "ErrBatchMustBeSync", inputs: [] },
  { type: "error", name: "ErrChannelGovernanceTokenAlreadySet", inputs: [] },
  { type: "error", name: "ErrInfiniteGame", inputs: [] },
  { type: "error", name: "ErrInvalidBatchInstruction", inputs: [] },
  { type: "error", name: "ErrInvalidFillType", inputs: [] },
  { type: "error", name: "ErrInvalidForwardDestinationChannelId", inputs: [] },
  { type: "error", name: "ErrInvalidForwardInstruction", inputs: [] },
  { type: "error", name: "ErrInvalidHops", inputs: [] },
  { type: "error", name: "ErrInvalidIBCVersion", inputs: [] },
  { type: "error", name: "ErrNotIBC", inputs: [] },
  { type: "error", name: "ErrOnlyMaker", inputs: [] },
  { type: "error", name: "ErrTokenBucketRateLimitExceeded", inputs: [] },
  { type: "error", name: "ErrTokenBucketZeroCapacity", inputs: [] },
  { type: "error", name: "ErrTokenBucketZeroRefillRate", inputs: [] },
  { type: "error", name: "ErrUnauthorized", inputs: [] },
  { type: "error", name: "ErrUnknownOpcode", inputs: [] },
  { type: "error", name: "ErrUnsupportedVersion", inputs: [] },
  { type: "error", name: "ExpectedPause", inputs: [] },
  { type: "error", name: "FailedCall", inputs: [] },
  {
    type: "error",
    name: "InsufficientBalance",
    inputs: [{ name: "balance", type: "uint256", internalType: "uint256" }, {
      name: "needed",
      type: "uint256",
      internalType: "uint256",
    }],
  },
  { type: "error", name: "InvalidInitialization", inputs: [] },
  { type: "error", name: "NotInitializing", inputs: [] },
  {
    type: "error",
    name: "SafeERC20FailedOperation",
    inputs: [{ name: "token", type: "address", internalType: "address" }],
  },
  { type: "error", name: "UUPSUnauthorizedCallContext", inputs: [] },
  {
    type: "error",
    name: "UUPSUnsupportedProxiableUUID",
    inputs: [{ name: "slot", type: "bytes32", internalType: "bytes32" }],
  },
] as const
